package book;

/**
 * Created with IntelliJ IDEA.
 * User: 12629
 * Date: 2022/2/25
 * Time: 21:36
 * Description:
 */
public class BookList {

    public Book[] bookList = new Book[10];

    private int usedSize;//当前书架上 有几本书

    public BookList() {
        this.bookList[0] = new Book("三国演义","罗贯中",18,"小说");
        this.bookList[1] = new Book("西游记","吴承恩",38,"小说");
        this.bookList[2] = new Book("水浒传","施耐庵",28,"小说");
        this.usedSize = 3;
    }

    public int getUsedSize() {
        return usedSize;
    }

    public void setUsedSize(int usedSize) {
        this.usedSize = usedSize;
    }
    //把书放到pos位置
    public void setBookList(int pos,Book book) {
        bookList[pos] = book;
    }

    //获取pos位置的书
    public Book getBook(int pos) {
        return bookList[pos];
    }
    //这里本质上是可以写 借阅书籍 等等操作的

}
